package com.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.dao.StationResourceDao;
import com.entity.StationResource;
import com.github.pagehelper.PageHelper;
import com.service.StationResourceService;

@Service
public class StationResourceServiceImpl implements StationResourceService {

	@Autowired
	StationResourceDao srd;

	@Override
	public List<StationResource> getAll(Integer pageNum) {
		PageHelper.startPage(pageNum, 20);
		return srd.getAll();
	}

	@Override
	public void add(StationResource sr) {
		srd.add(sr);
	}

	@Override
	public void del(Integer id) {
		srd.del(id);
	}

	@Override
	public StationResource getById(Integer id) {

		return srd.getById(id);
	}

	@Override
	public void update(StationResource sr) {
		srd.update(sr);
	}

}
